package com.blogspot.javagamexyz.gamexyz.ui;

import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.blogspot.javagamexyz.gamexyz.components.Stats;
import com.blogspot.javagamexyz.gamexyz.screens.control.overworld.InputManager;
import com.blogspot.javagamexyz.gamexyz.screens.control.overworld.MenuProcessor;

//This class builds the HUD widgets and is responsible for laying them out properly
//Currently each HUD formats itself
public class HUDManager {

	StatsHUD statsHud;
	InterfaceHUD interfaceHud;
	
	Stage hudStage;	
	Table hudTable;	
	
	public HUDManager(InputManager inputManager, MenuProcessor menuProcessor , Stage hudStage){
		//Initialize everything
		this.hudStage = hudStage;
		//hudTable = new Table();
    	statsHud = new StatsHUD(hudStage);
    	interfaceHud = new InterfaceHUD(inputManager, menuProcessor , hudStage);
    	
	}

	public void process(Stats stats) {
		statsHud.process(stats);
		
	}
	
	/*private void addToStage( float x, float y) {	//not really needed
		scrollPane = new ScrollPane(hudTable, skin);
		frame = new Image(skin.getPatch("frame"));
		
		//ignore the input listener for now, probably not needed
		
		hudStage.addActor(scrollPane);
		hudStage.addActor(frame);
		
		//now we're playing with table stuff, not sure how I feel about this
		//I think this has more to do with the tables within tables actually.
		//actually yes, all this shit is covered by the tables within tables, and should already be covered by what's his face up there
		//but in this case these things were being added to the table and to the stage, which means it should be alright to keep this shit
		//TODO modify HUD.java to make sure just the relevant table stuff is being handled, and then put it all together here... or something
		//in fact we weont even have a super table here... fuck it.
		
	}*/


	
	
	/*public void render(float delta) {	//TODO not really needed anymore
		hudStage.act(delta);	//TODO HUD renderHUD(delta)
		hudStage.draw();
		
	}

	public void resize(int width, int height, boolean b) { //TODO not really needed anymore
		hudStage.setViewport(width, height, b);		
	}

	public void dispose() {	//TODO not really needed anymore
		hudStage.dispose();
		
	}*/


}
